package string;

public class StringDemo {
    public static void main(String[] args) {
        String s1 = "123abc";
        String s2 = "123abc";
        System.out.println(s1 == s2);
        String s3 = new String("123abc");
        System.out.println(s1.equals(s3));
        System.out.println(s1 == s3);

        s1 = s1 + "";
        System.out.println(s1 == s2);

        String s5 = "123" + "abc";
        System.out.println(s5 == s2);

        String s6 = "abc";
        String s7 = "123" + s6;
        System.out.println(s7 == s2);
    }
}
